package com.itheima.day08;

public class 关于字符串加操作的原理 {
    public static void main(String[] args) {
        String s1 = "ab";
        s1 += "c";
        s1 += "d";
        System.out.println("s1 = " + s1);       // "abcd"

        StringBuilder sb = new StringBuilder("ab");
        sb.append("c");
        sb.append("d");
        String s2 = sb.toString();
        System.out.println("s2 = " + s2);

    }
}
